<template>
	<view class="news-list">
		<view class="list-con">
			<h3 style="padding: 0 0 40rpx 0">{{detailRow.title}}</h3>
			<view>
				{{detailRow.content}}
			</view>
			<view style="text-align: right;">
				{{detailRow.createTime}}
			</view>
		</view>
	</view>
</template>

<script>
import { API } from '@/config/myApi.js';
import { nextTick } from "vue";
	export default {
		data() {
			return {
				// 请求参数
        detailRow:{
					title: "",
					content: "",
					createTime: ""
				},
			};
		},
    onLoad(options) {
			this.detailRow = JSON.parse(decodeURIComponent(options.item));
      // this.putReadNews(); //消息已读
    },
   
    methods: {
			// 已读消息
			putReadNews() {
				let id = this.detailRow.id;
				API.getReadNewsApi(id).then(res=>{
					if (res.success) {
						console.log('删除成功')
					}
				})
			},
    }
	}
</script>

<style lang="scss" scoped>
	@import '../ascss/newsList.scss';
</style>
